Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add insert_at and insert_at_slot API #30

Merged
merged 2 commits into from
Oct 7, 2021
Merged

Conversation

sdleffler
Copy link
Contributor

This PR adds insert_at(&mut self, Index, T) -> Option<T> and insert_at_slot(&mut self, u32, T) -> (Index, Option<T>) methods; these are useful for manipulating the arena by-slot and doing deserialization or other circumstances in which we need to "resurrect" a previous or future index.

@LPGhatguy LPGhatguy merged commit 69d82b6 into LPGhatguy:main Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants